#include "head.h"

// 和客户端进行通信的函数
int do_worker(int net_fd){

    order_t order_s;
    while(1){
        memset(&order_s, 0, sizeof(order_s));
        int ret = recv_order(net_fd, &order_s);
        if(ret == -1) return 0;

        switch(order_s.order){
        case 0:
            printf("into cd\n");
            break;
        case 1:
            printf("into ls\n");
            break;
        case 2:
            printf("into puts\n");
            break;
        case 3:
            printf("into gets\n");
            break;
        case 4:
            printf("into rm\n");
            break;
        case 5:
            printf("into pwd\n");
            break;
        case 6:
            printf("into mkdir\n");
            break;
        case 7:
            printf("into rgst\n");
            break;
        case 8:
            printf("into login\n");
            break;
        }
    }

    return  0;
}
